//
// Created by HP on 2025/11/19.
//

#ifndef FLIGHTSERVER_STATIONS_H
#define FLIGHTSERVER_STATIONS_H

#include "Model.h"
#include <string>

class StationRole {
public:
    static std::string TrainStation;
    static std::string PlaneStation;
    static std::string CarStation;
};

// 车站
class Station :public Model{
public:
    std::string id;
    std::string name;
    std::string city;
    std::string role;
    std::string address;
    std::string createdAt;

    Station() ;

    void bind(const std::string& key, const std::string& value);

    bool save();

    static int getIdFromKey(const std::string& key, const std::string& value);
    
    // Getter methods
    std::string getId() const { return id; }
    std::string getName() const { return name; }
    std::string getCity() const { return city; }
    std::string getRole() const { return role; }
    std::string getAddress() const { return address; }
    std::string getCreatedAt() const { return createdAt; }
    
    // Setter methods
    void setId(const std::string& newId) { id = newId; }
    void setName(const std::string& newName) { name = newName; }
    void setCity(const std::string& newCity) { city = newCity; }
    void setRole(const std::string& newRole) { role = newRole; }
    void setAddress(const std::string& newAddress) { address = newAddress; }
};


#endif //FLIGHTSERVER_STATIONS_H
